<?php
$v_status_of_handover = -10;
$v_status_of_assigning = -10;
$v_status_of_handle_approve = -10;
$v_status_of_chaiman_approve = -10;
$v_order_clause = " ORDER BY FK_RECORDTYPE ASC,C_RECEIVED_DATE ASC";
$v_role = "";
if (trim($v_status_list)=="" || is_null($v_status_list)){
	$v_status_list = "";
}
if (trim($v_detail_status_compare)=="" || is_null($v_detail_status_compare)){
	$v_detail_status_compare = "";
}
$v_staff_id =  $_SESSION['staff_id'];
if (!isset($_SESSION['staff_id'])||is_null(($_SESSION['staff_id']))){
	$v_staff_id = 0;
}
if(_is_sqlserver()){
	$sql = "Exec Onegate_RecordGetAll";
	$sql = $sql . " " . $v_staff_id ;
	$sql = $sql . ",'". $v_recordtype_filter . "'" ;
	$sql = $sql . ",'"._ddmmyyyy_to_yyyymmdd($v_receive_date_filter) . "'" ;
	$sql = $sql . ",'". $v_status_list."'" ;
	$sql = $sql . ",'". $v_role."'" ;
	$sql = $sql . "," . $v_status_of_handover;
	$sql = $sql . "," . $v_status_of_assigning;
	$sql = $sql . "," . $v_status_of_handle_approve;
	$sql = $sql . "," . $v_status_of_chaiman_approve;
	$sql = $sql . ",'". $v_order_clause."'" ;
	$sql = $sql . ",'". $v_detail_status_compare."'" ;
	//echo $sql; //exit;
	$ado_conn->SetFetchMode(ADODB_FETCH_ASSOC);
	$arr_all_record = $ado_conn->GetAll($sql);
}
?>